/**
 * @param {number[]} nums
 * @return {number}
 */
var removeDuplicates = function(nums) {
    let pre = 0, tail=0;
    while(tail < nums.length) {
        if(nums[pre] != nums[tail]) {
            pre++;
            nums[pre] = nums[tail];
        }
        tail++;
    }
    return ++pre;
};
function run () {
    let args = [
        [0,0,1,1,1,2,2,3,3,4]
    ];
    return removeDuplicates(...args);
}
module.exports = run;